package com.iris.live.services.data.models;

import javax.persistence.*;

import java.math.BigDecimal;

/**
 * Created by DF on 9/20/2016.
 */
@Entity
@Table(name = "SNP_setting", schema = "sg_lsh", catalog = "")
public class SnpSettingModel {
    private int id;
    private String yM;
    private String permit;
    private Integer carCode;
    private Integer apperanceCode;
    private BigDecimal biStandardConfigMsrpTaxIncluded;
    private BigDecimal cashDiscountAndSiCostCelling;
    private BigDecimal siCost;
    private BigDecimal standardConfigurationAreaPriceLimitSnpTaxIncluded;
    private BigDecimal bmbsRetailSi;
    private BigDecimal bmbsWholesaleSi;
    private BigDecimal lshTa;
    private BigDecimal bmbsTa;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "y_m")
    public String getyM() {
        return yM;
    }

    public void setyM(String yM) {
        this.yM = yM;
    }

    @Basic
    @Column(name = "permit")
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "carCode")
    public Integer getCarCode() {
        return carCode;
    }

    public void setCarCode(Integer carCode) {
        this.carCode = carCode;
    }

    @Basic
    @Column(name = "apperanceCode")
    public Integer getApperanceCode() {
        return apperanceCode;
    }

    public void setApperanceCode(Integer apperanceCode) {
        this.apperanceCode = apperanceCode;
    }

    @Basic
    @Column(name = "BI_standard_config_MSRP_tax_included")
    public BigDecimal getBiStandardConfigMsrpTaxIncluded() {
        return biStandardConfigMsrpTaxIncluded;
    }

    public void setBiStandardConfigMsrpTaxIncluded(BigDecimal biStandardConfigMsrpTaxIncluded) {
        this.biStandardConfigMsrpTaxIncluded = biStandardConfigMsrpTaxIncluded;
    }

    @Basic
    @Column(name = "cash_discount_and_SI_cost_celling")
    public BigDecimal getCashDiscountAndSiCostCelling() {
        return cashDiscountAndSiCostCelling;
    }

    public void setCashDiscountAndSiCostCelling(BigDecimal cashDiscountAndSiCostCelling) {
        this.cashDiscountAndSiCostCelling = cashDiscountAndSiCostCelling;
    }

    @Basic
    @Column(name = "SI_cost")
    public BigDecimal getSiCost() {
        return siCost;
    }

    public void setSiCost(BigDecimal siCost) {
        this.siCost = siCost;
    }

    @Basic
    @Column(name = "standard_configuration_area_price_limit_SNP_tax_included")
    public BigDecimal getStandardConfigurationAreaPriceLimitSnpTaxIncluded() {
        return standardConfigurationAreaPriceLimitSnpTaxIncluded;
    }

    public void setStandardConfigurationAreaPriceLimitSnpTaxIncluded(BigDecimal standardConfigurationAreaPriceLimitSnpTaxIncluded) {
        this.standardConfigurationAreaPriceLimitSnpTaxIncluded = standardConfigurationAreaPriceLimitSnpTaxIncluded;
    }

    @Basic
    @Column(name = "BMBS_retail_SI")
    public BigDecimal getBmbsRetailSi() {
        return bmbsRetailSi;
    }

    public void setBmbsRetailSi(BigDecimal bmbsRetailSi) {
        this.bmbsRetailSi = bmbsRetailSi;
    }

    @Basic
    @Column(name = "BMBS_wholesale_SI")
    public BigDecimal getBmbsWholesaleSi() {
        return bmbsWholesaleSi;
    }

    public void setBmbsWholesaleSi(BigDecimal bmbsWholesaleSi) {
        this.bmbsWholesaleSi = bmbsWholesaleSi;
    }

    @Basic
    @Column(name = "LSH_TA")
    public BigDecimal getLshTa() {
        return lshTa;
    }

    public void setLshTa(BigDecimal lshTa) {
        this.lshTa = lshTa;
    }

    @Basic
    @Column(name = "BMBS_TA")
    public BigDecimal getBmbsTa() {
        return bmbsTa;
    }

    public void setBmbsTa(BigDecimal bmbsTa) {
        this.bmbsTa = bmbsTa;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SnpSettingModel that = (SnpSettingModel) o;

        if (id != that.id) return false;
        if (yM != null ? !yM.equals(that.yM) : that.yM != null) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (carCode != null ? !carCode.equals(that.carCode) : that.carCode != null) return false;
        if (apperanceCode != null ? !apperanceCode.equals(that.apperanceCode) : that.apperanceCode != null)
            return false;
        if (biStandardConfigMsrpTaxIncluded != null ? !biStandardConfigMsrpTaxIncluded.equals(that.biStandardConfigMsrpTaxIncluded) : that.biStandardConfigMsrpTaxIncluded != null)
            return false;
        if (cashDiscountAndSiCostCelling != null ? !cashDiscountAndSiCostCelling.equals(that.cashDiscountAndSiCostCelling) : that.cashDiscountAndSiCostCelling != null)
            return false;
        if (siCost != null ? !siCost.equals(that.siCost) : that.siCost != null) return false;
        if (standardConfigurationAreaPriceLimitSnpTaxIncluded != null ? !standardConfigurationAreaPriceLimitSnpTaxIncluded.equals(that.standardConfigurationAreaPriceLimitSnpTaxIncluded) : that.standardConfigurationAreaPriceLimitSnpTaxIncluded != null)
            return false;
        if (bmbsRetailSi != null ? !bmbsRetailSi.equals(that.bmbsRetailSi) : that.bmbsRetailSi != null) return false;
        if (bmbsWholesaleSi != null ? !bmbsWholesaleSi.equals(that.bmbsWholesaleSi) : that.bmbsWholesaleSi != null)
            return false;
        if (lshTa != null ? !lshTa.equals(that.lshTa) : that.lshTa != null) return false;
        if (bmbsTa != null ? !bmbsTa.equals(that.bmbsTa) : that.bmbsTa != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + (yM != null ? yM.hashCode() : 0);
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + (carCode != null ? carCode.hashCode() : 0);
        result = 31 * result + (apperanceCode != null ? apperanceCode.hashCode() : 0);
        result = 31 * result + (biStandardConfigMsrpTaxIncluded != null ? biStandardConfigMsrpTaxIncluded.hashCode() : 0);
        result = 31 * result + (cashDiscountAndSiCostCelling != null ? cashDiscountAndSiCostCelling.hashCode() : 0);
        result = 31 * result + (siCost != null ? siCost.hashCode() : 0);
        result = 31 * result + (standardConfigurationAreaPriceLimitSnpTaxIncluded != null ? standardConfigurationAreaPriceLimitSnpTaxIncluded.hashCode() : 0);
        result = 31 * result + (bmbsRetailSi != null ? bmbsRetailSi.hashCode() : 0);
        result = 31 * result + (bmbsWholesaleSi != null ? bmbsWholesaleSi.hashCode() : 0);
        result = 31 * result + (lshTa != null ? lshTa.hashCode() : 0);
        result = 31 * result + (bmbsTa != null ? bmbsTa.hashCode() : 0);
        return result;
    }
}
